boot: Drop ostree-finalize-staged.path
authorJonathan Lebon <jonathan@jlebon.com>
Fri, 7 Mar 2025 21:49:27 +0000 (16:49 -0500)
committerJonathan Lebon <jonathan@jlebon.com>
Fri, 7 Mar 2025 22:11:44 +0000 (17:11 -0500)
commit2b9912e9f9210a3fa8396485a91224620b2138bc
tree2df2c2a9fdd281f71df2724c205282739c57a87c
parent24d47308e993355beabe8ff78106a3869e82ea94
boot: Drop ostree-finalize-staged.path

This effectively reverts ac1a919f ("boot: Add
ostree-finalize-staged.path").

A bug came in on the OCP side that demonstrates that the way things are
setup right now is racy. If a reboot is triggered quickly after staging
a deployment, the whole pipeline of:

- ostree-finalize-staged.path, which triggers
- ostree-finalize-staged.service, which triggers
- ostree-finalize-staged-hold.service,

may not fully have happened before systemd isolates to `reboot.target`
which will want to kill all pending jobs.

Just directly starting the systemd unit is less elegant but much more
explicit and gets rid of any possible race because it's directly part of
the staging operation.

Fixes: https://issues.redhat.com/browse/OCPBUGS-51150
Makefile-boot.am
src/boot/ostree-finalize-staged.path [deleted file]
src/libostree/ostree-impl-system-generator.c
src/libostree/ostree-sysroot-deploy.c
tests/kolainst/destructive/staged-deploy.sh